package com.example.zlpermissionservice.api;

import com.example.zlpermissionservice.entity.UserRole;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author zhenliu（孙凌岳）
 * @Description TODO
 * @Date 2025/6/17 16:21
 * @Version 1.0
 */
@FeignClient(name = "zl-permission-service", path = "/permission/inner/user-role")
public interface UserRoleApi {
    /**
     * 批量保存 用户 角色关联信息
     * @param userRoleList
     * @return
     */
    Integer saveUserRoles(@RequestBody List<UserRole> userRoleList);

    /**
     * 根据id删除
     */
    Boolean deleteUserRoleByUserId(@PathVariable Long userId);

    /**
     * 批量删除
     */
    Boolean deleteByUserIds(@RequestBody List<Long> userIds);
}
